.search-box {
  display: inline-block;
  position: relative;
  margin-left: 1rem;

  @media print {
    display: none;
  }

  input {
    -webkit-appearance: none;
    appearance: none;
    cursor: text;
    width: var(--search-input-width);
    height: 2rem;
    color: var(--search-text-color);
    display: inline-block;
    border: 1px solid var(--search-border-color);
    border-radius: 2rem;
    font-size: 0.9rem;
    line-height: 2rem;
    padding: 0 0.5rem 0 2rem;
    outline: none;
    transition: all ease 0.3s;
    background: var(--search-bg-color) url('search.svg') 0.6rem 0.5rem no-repeat;
    background-size: 1rem;

    @media (max-width: 719px) {
      cursor: pointer;
      width: 0;
      border-color: transparent;
      position: relative;
    }

    &:focus {
      cursor: auto;
      border-color: var(--search-accent-color);

      @media (max-width: 719px) {
        cursor: text;
        left: 0;
        width: 10rem;
      }

      @media (max-width: 419px) {
        width: 8rem;
      }
    }
  }

  .suggestions {
    background: var(--search-bg-color);
    width: var(--search-result-width);
    position: absolute;
    top: 2rem;
    right: 0;
    border: 1px solid var(--search-border-color);
    border-radius: 6px;
    padding: 0.4rem;
    list-style-type: none;

    @media (max-width: 419px) {
      width: calc(100vw - 4rem);
      right: -0.5rem;
    }
  }

  .suggestion {
    line-height: 1.4;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;

    a {
      white-space: normal;
      color: var(--search-item-text-color);
    }

    &.focus {
      background-color: var(--search-item-focus-bg-color);

      a {
        color: var(--search-accent-color);
      }
    }

    .page-title {
      font-weight: 600;
    }

    .page-header {
      font-size: 0.9em;
      margin-left: 0.25em;
    }
  }
}
